Fix init-windows C++ codegen include to use codegenConfig.name#15619
Fix init-windows C++ codegen include to use codegenConfig.name#15619NisargaK-21 wants to merge 4 commits intomicrosoft:mainfrom
Conversation
|
@microsoft-github-policy-service agree |
|
/azp run PR |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@NisargaK-21 You have to run refer this |
|
/azp run PR |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
I ran |
You have to run Will be mentioned here |
|
Ran |
|
/azp run PR |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This change fixes incorrect C++ codegen include generation in the cpp-lib init-windows template by using codegenConfig.name from the user library’s package.json as the source of truth.
Previously, the template inferred codegen spec filenames from the project name (pascalName) or attempted to detect generated files on disk. This produced incorrect includes when the project name and codegen module name differed, particularly for scoped packages and during first-time initialization before codegen output exists.
The fix removes spec filename inference and disk scanning logic, reads codegenConfig.name directly from package.json, passes this value into the cpp-lib templates, and updates the generated C++ header to include Native<codegenConfig.name>Spec.g.h. This aligns the template output with how codegen names generated files and makes the behavior deterministic.
This change only affects generated template output and does not modify runtime behavior.
Microsoft Reviewers: Open in CodeFlow